package cn.zwx.activiti.example.model.po;

import java.io.Serializable;
import java.util.Date;

/**
 * 请假业务数据表
 * @TableName t_leave
 */
public class Leave implements Serializable {
    /**
     * 业务主键id
     */
    private Long id;

    /**
     * 业务名称
     */
    private String name;

    /**
     * 1-年假 2-调休 3-病假 4-事假
     */
    private Integer businessType;

    /**
     * 开始时间
     */
    private Date startTime;

    /**
     * 结束时间
     */
    private Date endTime;

    /**
     * 请假天数
     */
    private Integer dayNum;

    /**
     * 请假人
     */
    private Long userId;

    /**
     * 请假人名称
     */
    private String userName;

    /**
     * 任务交接人
     */
    private Long backUpId;

    /**
     * 任务交接人名称
     */
    private String backUpName;

    /**
     * 1-填写请假单 2-待审核 3-审核通过 4-审核拒绝
     */
    private Integer auditState;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    /**
     * 删除标记 1-正常 2-删除
     */
    private Integer delFlag;

    private static final long serialVersionUID = 1L;

    /**
     * 业务主键id
     */
    public Long getId() {
        return id;
    }

    /**
     * 业务主键id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 业务名称
     */
    public String getName() {
        return name;
    }

    /**
     * 业务名称
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 1-年假 2-调休 3-病假 4-事假
     */
    public Integer getBusinessType() {
        return businessType;
    }

    /**
     * 1-年假 2-调休 3-病假 4-事假
     */
    public void setBusinessType(Integer businessType) {
        this.businessType = businessType;
    }

    /**
     * 开始时间
     */
    public Date getStartTime() {
        return startTime;
    }

    /**
     * 开始时间
     */
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    /**
     * 结束时间
     */
    public Date getEndTime() {
        return endTime;
    }

    /**
     * 结束时间
     */
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    /**
     * 请假天数
     */
    public Integer getDayNum() {
        return dayNum;
    }

    /**
     * 请假天数
     */
    public void setDayNum(Integer dayNum) {
        this.dayNum = dayNum;
    }

    /**
     * 请假人
     */
    public Long getUserId() {
        return userId;
    }

    /**
     * 请假人
     */
    public void setUserId(Long userId) {
        this.userId = userId;
    }

    /**
     * 请假人名称
     */
    public String getUserName() {
        return userName;
    }

    /**
     * 请假人名称
     */
    public void setUserName(String userName) {
        this.userName = userName;
    }

    /**
     * 任务交接人
     */
    public Long getBackUpId() {
        return backUpId;
    }

    /**
     * 任务交接人
     */
    public void setBackUpId(Long backUpId) {
        this.backUpId = backUpId;
    }

    /**
     * 任务交接人名称
     */
    public String getBackUpName() {
        return backUpName;
    }

    /**
     * 任务交接人名称
     */
    public void setBackUpName(String backUpName) {
        this.backUpName = backUpName;
    }

    /**
     * 1-填写请假单 2-待审核 3-审核通过 4-审核拒绝
     */
    public Integer getAuditState() {
        return auditState;
    }

    /**
     * 1-填写请假单 2-待审核 3-审核通过 4-审核拒绝
     */
    public void setAuditState(Integer auditState) {
        this.auditState = auditState;
    }

    /**
     * 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 更新时间
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 更新时间
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 删除标记 1-正常 2-删除
     */
    public Integer getDelFlag() {
        return delFlag;
    }

    /**
     * 删除标记 1-正常 2-删除
     */
    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Leave other = (Leave) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getBusinessType() == null ? other.getBusinessType() == null : this.getBusinessType().equals(other.getBusinessType()))
            && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime()))
            && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
            && (this.getDayNum() == null ? other.getDayNum() == null : this.getDayNum().equals(other.getDayNum()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
            && (this.getBackUpId() == null ? other.getBackUpId() == null : this.getBackUpId().equals(other.getBackUpId()))
            && (this.getBackUpName() == null ? other.getBackUpName() == null : this.getBackUpName().equals(other.getBackUpName()))
            && (this.getAuditState() == null ? other.getAuditState() == null : this.getAuditState().equals(other.getAuditState()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getDelFlag() == null ? other.getDelFlag() == null : this.getDelFlag().equals(other.getDelFlag()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getBusinessType() == null) ? 0 : getBusinessType().hashCode());
        result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
        result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
        result = prime * result + ((getDayNum() == null) ? 0 : getDayNum().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
        result = prime * result + ((getBackUpId() == null) ? 0 : getBackUpId().hashCode());
        result = prime * result + ((getBackUpName() == null) ? 0 : getBackUpName().hashCode());
        result = prime * result + ((getAuditState() == null) ? 0 : getAuditState().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getDelFlag() == null) ? 0 : getDelFlag().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", businessType=").append(businessType);
        sb.append(", startTime=").append(startTime);
        sb.append(", endTime=").append(endTime);
        sb.append(", dayNum=").append(dayNum);
        sb.append(", userId=").append(userId);
        sb.append(", userName=").append(userName);
        sb.append(", backUpId=").append(backUpId);
        sb.append(", backUpName=").append(backUpName);
        sb.append(", auditState=").append(auditState);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", delFlag=").append(delFlag);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}